var querystring = require('querystring');
var utils = require('./utils');

exports.tweetMsg = function (_info, callback) {

    var _this = this, _result = "1";

    var _data = querystring.stringify({
        key: "8b9dd99e8422e1168bd43c6428c598c7",
        info: _info || "笑话"
    });

    var options = {
        host: "www.tuling123.com",
        method: 'POST',
        path: "http://www.tuling123.com/openapi/api",
        headers: {
            "Content-Type": 'application/x-www-form-urlencoded',
        }
    };


    utils.request(_data, options, function (chunk) {
        callback(JSON.parse(chunk)["text"]);
    });
};

